1. Field of the Invention
The present invention relates to a multi-dimensional texture drawing apparatus, a multi-dimensional texture compressing apparatus, a multi-dimensional texture drawing system, a multi-dimensional texture drawing method and a multi-dimensional texture drawing program in a multi-dimensional texture mapping technology for generating a high-quality computer graphic image using a plurality of photographic images (texture images) taken in different conditions such as a photographing position or a lighting position.
2. Description of the Related Art
In the field of 3-dimensional computer graphics (CG), there is a technique called texture mapping, in which photographic images or the like (texture images) acquired from the real world are pasted onto the surface of a model forming the three dimensions in order to perform high-quality drawing. As the 3-dimensional model, there is typically used a polygon model which is formed out of triangular patches.
However, each texture used for texture mapping is a photographic image taken in specific lighting conditions and in a specific camera position. In the texture, information such as the shape of the 3-dimensional model to be pasted on, or a viewing position and a lighting position at the time of drawing is not taken into consideration. As a result, the texture mapping results in monotonic drawing with no variation of shades. Thus, the difference of the texture from the real photographic image is large.
Here, consider the characteristics of a real photographic image. A real photographic image taken by a camera can be regarded as an image having acquired information of light incident on each pixel through a lens. That is, a texture image can be regarded as an aggregation of light defined by parameters such as a camera position, a camera direction and a time at the time of photographing. Therefore, there is a technique for generating a high-quality image by reuse of such light information, called an image based rendering technique.
As one of such image based rendering methods, there is a method in which a plurality of photographic images acquired out of an object to be photographed in different viewing positions or different lighting conditions are provided as texture images in advance, and mapping is performed with the provided texture images being switched on the basis of information such as a normal vector, a viewing position in the object surface, and a lighting position at the time of rendering a 3-dimensional object. The method is known as a bidirectional texture function (BTF) (make reference to “K. J. Dana, B. van Ginneken, S. K. Nayar, and J. J. Koenderink. Reflectance and texture of real world surfaces. ACM Transaction on Graphics, 18(1): 1-34, 1999”).
In order to prepare a large number of texture images (here referred to as “multi-dimensional texture”) in accordance with a plurality of considerable photographic environments, a stupendous amount of texture memory is essential, and a technique of texture compression and transfer is required.
In the related art, there have been provided some methods, including a method in which constituent texture images are compressed in advance respectively by use of an image compression technique, and a method in which a variation of brightness for each pixel is approximated by a function, and parameters of the function are stored in advance. However, these methods have a problem that it takes much time for compression or expansion, or a problem that it is necessary to provide a restriction in photographic environment, for example, to fix the viewing position, so that there is no efficient texture/data format taking both the viewing position and the lighting position into consideration.
In addition, it will go well in the related art if one texture image is prepared for a model. Therefore, the reduction in texture cache hit ratio or the increase in texture data transfer amount due to switching of textures has not been brought into question. However, when a high-quality image is produced using a multi-dimensional texture as described above, the relative viewing position or the relative lighting position in each point on the model surface varies in accordance with the shape of the model, which is a subject of mapping. Accordingly, a texture image to be imported has to be switched in accordance with the variation of the relative viewing position or the relative lighting position. That is, there is a possibility that switching of texture images occurs frequently pixel by pixel at the time of drawing in spite of a single model.
Further, with the advance of high resolution of texture images themselves, the data size of the textures has increased. When such texture images are switched frequently, there may occur a reduction in effectiveness of texture cache or a neck in transferring texture data, causing a bottleneck for real-time processing of computer graphics.